home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
icon tools
/
deficon
/
deficon.guide
(
.txt
)
< prev
next >
Wrap
Amigaguide Document
|
1996-04-07
|
26KB
|
477 lines
@database "DefIcon"
@node main "DefIcon V1.52
1994 Chris Hurst"
DefIcon
Copyright 1994 Chris Hurst
@{" What is DefIcon " link whatis}
@{" Running from CLI " link runcli}
@{" Running from WB " link runwb}
@{" The Commodity " link commodity}
@{" The Interface " link interface}
@{" Setting The Popkey " link popkey}
@{" Trouble Shooting " link trouble}
@{" Credits " link credits}
@{" History " link history}
@{"Copyright/Disclaimer" link copyright}
@endnode
@node whatis "What is DefIcon?"
DefIcon is a small commodity program which exploits many new features of
Workbench Two and above. By using the new Tools Application Menu DefIcon
allows you to create new Icons for any Project, Tool, Drawer or Trashcan
which do not have one already. It also allows you to overwrite the Icon's
current Image with the Default Image for that type.
How does it do this? One of the new, and most useful, features of the
Workbench 2+ is the 'Show All Files' option on the 'Window' Menu. This
option displays a user-defined default Image for any file which doesn't
have a .info Icon file. These Images are called Pseudo-Icons. DefIcon
simply takes any of these Pseudo-Icons selected and converts them into
real Icon files (ie. creates a .info file). If an existing Icon is also
selected then DefIcon will overwrite the Icon Image without destroying
useful information like the Icons position, any ToolTypes set etc.
How to create a new Icon for a file.
First of all you must run DefIcon. Make sure that the Commodity is set
to Active. See 'Running DefIcon' sections and 'The Commodity' for more
information.
Open the directory in which the file is contained. Click on the Window
and select 'Show All Files' from the 'Window' Menu. All files should now
be allocated a Pseudo-Icon. Select one or more Icons by clicking on them
(hold down the SHIFT key if you want to select more than 1). Now select
the 'Default Icon' Menu Item which will be in the 'Tools' Menu on the
Workbench Screen. All of the Pseudo-Icons will now be converted to real
Icons with .info files. Now select 'Show Only Icons' from the 'Window'
Menu and the Icons will remain. Good innit!?!
If the Pseudo-Icons failed to convert then an error must have occurred.
It may be a Write-protected disk for example. DefIcon switches System
Error Requesters. To find the reason open DefIcons Interface and retry.
The program should display an error in the Workbench Screens Title Bar.
See 'The Interface' and 'Trouble Shooting' for more information.
NOTE:
When creating a new Icon for the Trashcan, the drawer must be named
Trashcan. The name IS case sensitive.
@endnode
@node hidden1 "PS #1"
Isn't it fun browsing through an AmigaGuide Document!?!
@endnode
@node runcli "Running from CLI"
To run DefIcon from CLI just enter its filename with the full path. The
program detaches itself from the CLI so that you can continue to use it
or close it down. Note if you run DefIcon again the original version
will display its interface and the new version will exit.
DefIcon uses Kickstart 2s ReadArgs() function to process the parameters.
To get a template type
DefIcon ?
The following should appear in the CLI:
CX_PRIORITY/K/N,CX_POPKEY/K,CX_POPUP/K,ACTIVE/K,OVERWRITE/K,REQUEST/K:
These are the six parameters that can be used to control DefIcon. The
name of each parameter is given along with its type:
/K Keyword The name of the parameter must be entered before
the data. E.G. CX_POPUP=NO or CX_POPUP NO.
/N Numeric The data must be an integer. E.G. CX_PRIORITY=10.
@{b}CX_PRIORITY@{ub}
Template: CX_PRIORITY/K/N=<priority>
Usage : Sets the Commodities Priority. If two Commodities share the
same hotkey description then the Operating System notifies
the Commodity with the highest priority.
Ranges : -128..+127
Default : CX_PRIORITY=0
@{b}CX_POPKEY@{ub}
Template: CX_POPKEY/K=<hotkey description>
Usage : Sets the Commodities Popup Key (or Hotkey). The Popup Key is
a combination of keys held down to make DefIcons Interface
Window appear at the front of the screen.
When setting the Popup Key remember to enclose the parameter
in quotation marks (") if there are any spaces in it.
See CX_PRIORITY.
Ranges : See @{"Setting The Popkey" link popkey}
Default : CX_POPKEY="control lalt d"
@{b}CX_POPUP@{ub}
Template: CX_POPUP/K=<YES/NO>
Usage : Controls whether to show the Interface Window when DefIcon
is started. DefIcon will by default Open the Interface when
run. Set this to NO if you want it to stay hidden.
Ranges : YES|NO
Default : CX_POPKEY=YES
@{b}ACTIVE@{ub}
Template: ACTIVE/K=<YES/NO>
Usage : Controls whether or not the Commodity should be active when
DefIcon is started. If the Commodity is disabled then the
Popup Key will be disabled. Also the Application Menu is
disabled so you will not be able to use DefIcon until you
reactivate it. Set to NO if you want to deactivate it on
startup.
Ranges : YES|NO
Default : ACTIVE=YES
@{b}OVERWRITE@{ub}
Template: OVERWRITE/K=<YES/NO>
Usage : Controls whether DefIcon is allowed to overwrite existing
Icon files with the Default image. If you only want to use
DefIcon to create new Icons for Pseudo-Icons, set overwrite
to NO.
Ranges : YES|NO
Default : OVERWRITE=YES
@{b}REQUEST@{ub}
Template: REQUEST/K=<NONE/ONCE/EACH>
Usage : Specifies your choice of confirmation requester.
Ranges : NONE Set REQUEST=NONE if you want no confirmation requester
at all.
ONCE Set REQUEST=ONCE if you want to a single YES or NO
confirmation requester when you select the menu.
You only get a single requester even if you select
multiple Icons.
EACH Set REQUEST=EACH for a YES or NO requester for every
Icon file to be created/altered.
Default : REQUEST=NONE
@endnode
@node hidden2 "PS #2"
The secret of success is sincerity. Once you can fake that you've got it
made!
@endnode
@node runwb "Running from WorkBench"
To run DefIcon from WorkBench either double-click on its Icon or place
the program with its Icon in the WBStartup directory of your Workbench
disk.
DefIcon recognizes the following ToolTypes:
@{b}CX_PRIORITY@{ub}
Template: CX_PRIORITY=<priority>
Usage : Sets the Commodities Priority. If two Commodities share the
same hotkey description then the Operating System notifies
the Commodity with the highest priority.
Ranges : -128..+127
Default : CX_PRIORITY=0
@{b}CX_POPKEY@{ub}
Template: CX_POPKEY=<hotkey description>
Usage : Sets the Commodities Popup Key (or Hotkey). The Popup Key is
a combination of keys held down to make DefIcons Interface
Window appear at the front of the screen.
When setting the Popup Key remember to enclose the parameter
in quotation marks (") if there are any spaces in it.
See CX_PRIORITY.
Ranges : See @{"Setting The Popkey" link popkey}
Default : CX_POPKEY="control lalt d"
@{b}CX_POPUP@{ub}
Template: CX_POPUP=<YES/NO>
Usage : Controls whether to show the Interface Window when DefIcon
is started. DefIcon will by default Open the Interface when
run. Set this to NO if you want it to stay hidden.
Ranges : YES|NO
Default : CX_POPKEY=YES
@{b}ACTIVE@{ub}
Template: ACTIVE=<YES/NO>
Usage : Controls whether or not the Commodity should be active when
DefIcon is started. If the Commodity is disabled then the
Popup Key will be disabled. Also the Application Menu is
disabled so you will not be able to use DefIcon until you
reactivate it. Set to NO if you want to deactivate it on
startup.
Ranges : YES|NO
Default : ACTIVE=YES
@{b}OVERWRITE@{ub}
Template: OVERWRITE=<YES/NO>
Usage : Controls whether DefIcon is allowed to overwrite existing
Icon files with the Default image. If you only want to use
DefIcon to create new Icons for Pseudo-Icons, set overwrite
to NO.
Ranges : YES|NO
Default : OVERWRITE=YES
@{b}REQUEST@{ub}
Template: REQUEST=<NONE/ONCE/EACH>
Usage : Specifies your choice of confirmation requester.
Ranges : NONE Set REQUEST=NONE if you want no confirmation requester
at all.
ONCE Set REQUEST=ONCE if you want to a single YES or NO
confirmation requester when you select the menu.
You only get a single requester even if you select
multiple Icons.
EACH Set REQUEST=EACH for a YES or NO requester for every
Icon file to be created/altered.
Default : REQUEST=NONE
@{b}DONOTWAIT@{ub}
Template: DONOTWAIT
Usage : This is a Workbench Startup ToolType. This tells Workbench
not to wait until DefIcon finishes running and to continue
with the rest of startup. This ToolTypes @{b}MUST@{ub} be present.
Ranges : N/A
Default : N/A
@{b}STARTPRI@{ub}
Template: STARTPRI=<priority>
Usage : Another Workbench ToolType. This tells the Workbench which
order to launch programs in WBStartup. The program with the
highest start priority value (STARTPRI) is run first. This
is included here so that you can force other programs that
create an Application Menu Item to run in a specific order
so that the Menu Items are always in the same order.
This is a Workbench ToolType so @{b}ALL@{ub} programs will use it.
Ranges : -128 to +127
Default : STARTPRI=0
@endnode
@node commodity "The Commodity"
DefIcon is a Commodity. Using the Commodity and the Exchange program you
are able to control DefIcon. When the Exchange Interface is opened you
will see a list of Commodities, four control buttons and some space for
information.
Find DefIcon in the list and select it. You should see some information
about Deficon and its purpose appear. The four control buttons allow you
to control DefIcon. The buttons are:
Show Interface Brings up DefIcons interface.
This does exactly the same as pressing the
Popkey combination.
If the interface is hidden behind other windows
then it will be brought to the front.
See: @{"The Interface" link interface}
Hide Interface Closes the interface if it is open. This is the
same as clicking on Hide or the Close Gadget in
the interface window.
NOTE: This does not quit the program.
Active|Inactive The Cycle Gadget allows you to enable or disable
DefIcon. When Disabled you cannot use the Popkey
combination to show the interface. When disabled
selecting the Menu Item will do nothing.
Remove This will quit DefIcon completely. You can also
use the Quit button in the interface window.
@endnode
@node interface "The Interface"
The interface allows you access to DefIcons preferences. The interface
contains 7 buttons:
Overwrite This is a checkbox button. When activated a check mark
(tick) will appear in the box. This option specifies
whether DefIcon should overwrite existing Icon (.info)
files with a default image. If the option is active (ie.
the box contains a check mark) then Icon files will be
overwritten. The default is active and can be set with
the OVERWRITE tooltype/parameter.
Active This is also a checkbox button. This option toggles the
status of the program between active (when the box is
checked) or inactive (when the box is empty). If set to
inactive the Commodity is disabled so you cannot use the
Popkey or the Application Menu Item. You can also toggle
this option with Exchange (see @{"The Commodity" link commodity} )
The default is active and can be set at startup with the
ACTIVE tooltype/parameter.
Request The confirmation request option is set with one of three
radio buttons. When a new button is selected the others
are automatically de-selected so that only one option
can be set. The requester option controls the extent of
the confirmation requesters. Confirmation requesters
appear when DefIcon creates (or overwrites) an Icon. The
option is set with the REQUEST tooltype/parameter and
the choices are:
Request None Turns off the confirmation requesters
completely. This is the default setting
and can be set with REQUEST=NONE
Request Once Brings a single requester up when the
Menu Item is selected stating the number
of Icons selected. Click Yes to continue
or No to cancel. This can be set with
REQUEST=ONCE
Request Each Brings up a separate requester for every
Icon it creates or overwrites. The name
of the Icon file is displayed. Click Yes
to continue or No to skip the Icon. This
can be set with REQUEST=EACH
Hide This button closes the interface. The program is still
running. You can use the Popkey to open up the interface
if the Commodity is active.
Quit This quits the program and removes the Commodity. The
interface is removed if it is open.
@endnode
@node hidden3 "PS #3"
This page is the winner of the 'Creative Use Of A Blank Page 1994 Award'
@endnode
@node popkey "Setting the Popkey"
The Popkey (or Hotkey) is used to either open a closed interface or to
bring an open interface to the front of the screen. The popkey is a set
of keys which must be held down together. To set DefIcons Popkey use the
CX_POPKEY=<Popkey description> parameter/tooltype.
The description can contain the following keys:
F1-F10 Function keys
Typewriter area key Any letter, number or symbol etc. MUST be
preceeded by a qualifier key:
Shift Either shift key
LShift Left Shift key only
RShift Right Shift key only
Alt Either Alt key
LAlt Left Alt key only
RAlt Right Alt key only
LAmiga Left Amiga Key
RAmiga Guess!!
Control The CTRL key
CTRL The CTRL key (Kickstart 3+ only)
Numericpad Numeric key - The keypad key must be pressed
The same number key from the
typewriter area will not count
Numericpad 5 5 key from the Numeric keypad
CTRL a CTRL key and 'a' pressed together
F10 The F10 key
@endnode
@node trouble "Trouble Shooting"
@{b}Problems With DefIcon@{ub}
A) When trying to create an Icon, nothing happens.@{i}
Make sure that the Commodity is Active. If the Commodity is Active
then bring up the Interface and try again. If it still fails there
should be an error message in the Workbench Screen Title Bar.
@{ui}See below for messages.
B) When trying to change an existing Icon, nothing happens.@{i}
Make sure that the Commodity is Active. If the Commodity is Active
then bring up the Interface. Ensure that Overwrite mode is enabled
and try again. If it still fails there should be an error message in
the Workbench Screen Title Bar.@{ui}
See below for messages.
C) The Hotkey doesn't work.@{i}
Firstly show the Interface with Exchange. Ensure that the Commodity
is active. If it is active then check the hotkey description in the
Interface Title Bar (in brackets). If this is correct then there may
be a program running with a higher priority which is getting the key
first. Try another Hotkey.@{ui}
D) When using DefIcon from the WBStartup Drawer the Workbench puts up an
annoying requester stating that DefIcon hasn't returned.@{i}
Simply add the ToolType @{ui}DONOTWAIT@{i} to the list of ToolTypes.
@{ui}
@{b}Common Error Messages
Message Meaning@{ub}
disk is write-protected The disk containing the Icon is protected.
Unprotect the disk and try again.
object not found DefIcon could not find the Icon file.
Check that the disk is in the drive. The
program switches off System Requesters so
you will not be asked to insert the disk.
object protected from The Icon file has been delete protected.
deletion Select the Icon and use 'Information' to
alter the protection. Refer to your
Workbench manual for further details.
overwrite disabled You tried to overwrite an existing Icon
with overwrite mode switched off.
@endnode
@node credits "Credits"
Design: Chris Hurst.
Code: Chris Hurst.
Except for Launching Routine: David Boucher.
Hello to: Bouch, Steve and Dave!
Thanks: David Boucher for help/code bits!
DefIcon is written in DICE C. Thanks to Matt Dillon and Amiga Shopper
for their book offer.
@endnode
@node history "History"
DefIcon Version History
----------------------------------------------------------------------------
Version 0.1 (15.1.94)
Appmenu added to give default icon to existing or pseudo icons.
Commodity added so that the program can be REMOVEd with exchange.
CX_PRIORITY tooltype added but no hotkey given yet.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 0.2 (17.1.94)
Enable/Disable added so that the program can be switched off when not
used to avoid selecting it by accident.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 0.3 (18.1.94)
ACTIVE tooltype added so that the program can be started up in disabled
mode.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 0.5 (1.2.94)
Version 0.4 missed out due to complete stuff up of the interface.
Somewhere I introduced a bug which crashed Workbench when the program
closed down. I couldn't find the cause so have gone back to Version 0.3
and started again. So what's new?
Requesters added to ask you to confirm adding/altering an icon. They can
be switched off completely, only occur once when you first select the
menu item or confirm every icon it is going to change.
REQUEST tooltype implemented (REQUEST=NONE/ONCE/EACH) so that DefIcon
will ask you before adding/altering an icon.
OVERWRITE tooltype added so that you can force DefIcon not to write over
existing icons if you don't want to ever alter existing images. The
interface will allow you to toggle this so it is wise to start up with
OVERWRITE=NO set and toggle it when an existing icon needs changing.
Hotkey added. Interface added. CX_POPKEY, CX_POPUP tooltypes added.
Interface Window now re-opens in its last position when Show Interface or
Hotkey used.
System requesters removed so that if an icon is selected from any disk
that has been removed the "Insert Volume..." requester will not appear.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 0.6 (2.2.94)
More things to go wrong added. CLI argument processing added (using
ReadArgs()). Parameters are:
CX_PRIORITY,CX_POPKEY,CX_POPUP,ACTIVE,OVERWRITE,REQUEST. The keyword HAS
TO be given e.g. CX_POPKEY=f9 ACTIVE=no request=None.
Type DefIcon ? for a template.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.0 (4.2.94)
Tidied up Interface, fixed bug in CLI processing.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.1 (5.2.94)
Rewrote interface to include HIDE & QUIT gadgets and an Active Checkbox
gadget. Set new default for hotkey as the last one wouldn't work with
Kickstart 2! (It used ctrl instead of control).
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.2 (13.3.94)
Fixed possible bug when clearing up any messages left in ports.
Put in standard dos error messages which appear in the WorkBench Screen
Title if the DefIcon Interface is open so you can see why the program
failed to do something.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.3 (29.5.94)
Fixed a very stupid bug. I cannot believe I was such a complete berk!!!
When Enabling/Disabling the Commodity I was redrawing the window. Even
if it was closed!! Which caused a spectacular crash. As you can see, it
has taken me two months to spot it! (oh dear!)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.4 (12.6.94)
Added new Icon Type (Garbage).
Existing Garbage Icons can be overwritten. Creating new one is described
below:
Create a Drawer named Trashcan (case sensitive). Select this and choose
Default Icon from the 'Tools' menu. This should now become a real, fully
functional Trashcan!
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.5 (2.9.94)
CLI launch routine fiddled to stop potential crash.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.51 (17.9.94)
Active Gadget and Commodity got out of sync as the Gadget wasn't updated
unless the window was open! Fixed that! Stupid bug anyway!
Added a couple of Error Messages for something or other. Oh I can't be
bothered. Nothing major, just tidying up a bit.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Version 1.52 (28.10.94)
BUG FIX: Problem when DrawInfo changed, DefIcon used the drawinfo from when
it was run. Now gets it just before it opens the window!
----------------------------------------------------------------------------
NOTE: THERE WILL BE NO MORE UPDATES OF DEFICON! I'VE HAD ENOUGH!!
----------------------------------------------------------------------------
@endnode
@node copyright "Copyright and Disclaimer"
@{b}@{u}DefIcon@{ub}@{uu}
DefIcon and the supplied documentation are copyright
1994 Chris Hurst.
You are free to duplicate and distribute the program and documentation
as long as you do not make a profit from doing so. You may charge for the
costs of duplication.
You may not modify, disassemble or decompile the program in whole or in
part.
All files listed below *MUST* be included when distributing the program:
DefIcon (Program File)
DefIcon.guide (AmigaGuide Document)
DefIcon
1994 Chris Hurst
@{b}Disclaimer@{ub}
The author takes no responsibility for any loss or damage caused to data
or equipment which may have been caused directly or indirectly by the use
of the accompanying software.
The software is provided 'as is', without a warrantee of any kind, either
expressed or implied, as to the quality, accuracy or performance of the
software provided. The software has been tested before release and every
effort has been made to ensure the removal of bugs, however, the author
cannot guarantee that all bugs have been removed or that the software is
compatible with any particular hardware.
@endnode